<template>
  <div class="step-box">
    <div class="form-box">
      <div class="result-box">
        <template v-if="status === -1">
          <p class="status"><i class="el-icon-warning warning-icon" /> 等待平台审核（1-3工作日）</p>
          <p class="handle"><el-button type="primary" @click="cancel">撤销发布</el-button></p>
        </template>
        <template v-if="status=== 0">
          <p class="status"><i class="el-icon-error fail-icon" />很遗憾，您的审核尚未通过，请根据驳回原因修改后再次提交审核</p>
          <p class="message">这里可以查看<el-button type="text" class="audit-detail" @click="showLog">审核日志详情</el-button></p>
          <p class="handle"><el-button type="primary" @click="reSubmit">重新提交</el-button></p>
        </template>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Step3',
  props: {
    status: {
      // 审核状态  -1：待审核  0：未通过 1：已通过  2：已撤销
      type: [Number, String],
      default: -1
    }
  },
  data() {
    return {
    }
  },

  methods: {

    // 重新提交
    reSubmit() {
      this.$emit('resubmit')
    },

    // 展示拒绝原因
    showLog() {
      this.$emit('reason')
    },

    // 撤销
    cancel() {
      this.$emit('cancel')
    }

  }
}
</script>
<style lang="scss" scoped>
@import "@/components/Approve/step.scss";
</style>
